package com.example.pharmacy.mapper;

import com.example.pharmacy.model.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: asus
 * Date: 2024-12-22
 * Time: 19:21
 */
@Mapper
public interface OrderItemMapper {
    Integer updateOrderItem(OrderItem orderItem);
    @Select("select * from order_items where order_item_id=#{itemId} and is_deleted = 0")
    OrderItem selectOrderItemById(Integer itemId);

    Integer addOrderItems(@Param("orderItems") List<OrderItem> orderItems);
}
